<%-- 
    Document   : create
    Created on : May 5, 2011, 5:30:26 PM
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
          
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link type="text/css" rel="stylesheet" href="style.css" />
        <title>Vytvorenie položky - ODSKartW</title>
    </head>
    <body>
        <h1>Vytvorenie položky</h1>
        <div>
            <h2>Názov záložky: <c:out value="${categoryTitle}" /></h2>
            <c:if test="${not empty error}">
            <div id="error">
                <c:out value="${error}"/>
            </div>
            </c:if>
            <form name="addingForm" action="${pageContext.request.contextPath}/CreateMedium" method="post">
                <table>
                    <c:forEach items="${header1}" var="attribute">
                       
                        <c:if test="${attribute != 'Id'}">
                    <tr>
                        <td><c:out value="${attribute}" /></td>
                        <td><input type="text" name="${attribute}"></input><br /></td>
                    </tr>
                        </c:if>
                    </c:forEach>
                    
                    <tr>
                        <td>&nbsp;</td>
                        <td><input type="submit" name="submit_button" value="Vytvor" />
                        <input type="submit" name="submit_button" value="Zruš" /></td>
                    </tr>
                </table> 
                <input type="hidden" name="categoryTitle" value="${categoryTitle}" />
                <input type="hidden" name="header1" value="${header1}" />
                <input type="hidden" name="media" value="${media}" />
            </form>
        </div>
    </body>
</html>
